﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="rankinglist_report.aspx.cs" Inherits="Customer_Profile.eCardReport.rankinglist_report" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v9.3, Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v9.3, Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v9.3.Export, Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView.Export" tagprefix="dx" %>
<%@ Register Src="../mainTop.ascx" TagName="mainTop" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Customer List</title>
    <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR" />
    <meta content="C#" name="CODE_LANGUAGE" />
    <meta content="JavaScript" name="vs_defaultClientScript" />
    <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="/css/style.css" type="text/css" rel="stylesheet" />

    <script language="javascript" type="text/javascript" src="../Js/common.js"></script>
    <script language="javascript" type="text/javascript" src="/js/CalPopUp.js"></script>
    <script language="javascript" type="text/javascript" src="/js/combox.js"></script>
    <script language="javascript"  type="text/javascript">
        function checkForm() {
            var start_date = document.getElementById("txtgedatebegin").value;
            var end_date = document.getElementById("txtgedateend").value;

            if (trim(start_date) != '' && trim(end_date) != '') {
                if (!strDateTime(start_date)) {
                    alert('起始日期格式不准确');
                    return false;
                }
                if (!strDateTime(end_date)) {
                    alert('结束日期格式不准确');
                    return false;
                }
            }
            return true;
        }
    </script>
</head>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0">
    <form id="Form1" runat="server">
        <table height="100%" cellspacing="0" cellpadding="0" width="100%" border="0">
            <tr>
                <td width="1" background="/images/dot_vline.gif">
                    <img height="1" src="/images/spacer.gif" width="1"></td>
                <td valign="top" width="15">
                    <img height="1" src="/images/spacer.gif" width="15"></td>
                <td valign="top">
                    <table cellspacing="0" cellpadding="0" width="100%" border="0">
                        <tr>
                            <td style="height: 23px">
                                <uc1:mainTop ID="MainTop1" runat="server" />
                                <dx:ASPxGridViewExporter ID="gridExport" runat="server" GridViewID="ASPxGridView1">
                                </dx:ASPxGridViewExporter>
                                <span class="navi-blu"><span class="navi-blk">个人旅行卡管理 &gt; 分类报表统计 &gt; 分子公司销售</span>
                                </span>
                            </td>
                        </tr>
                        <tr>
                            <td background="/images/dot_hline.gif">
                                <img height="1" src="/images/spacer.gif" width="1"></td>
                        </tr>
                    </table>
                    <table style="position: relative; top: 6px" cellspacing="0" cellpadding="0" width="100%" border="0">
                        <tr>
                            <td>
                                <img height="6" src="/images/corner_lft1.gif" width="6"></td>
                            <td>
                                <div align="right">
                                    <img height="6" src="/images/corner_rgt1.gif" width="6"></div>
                            </td>
                        </tr>
                    </table>
                    <table cellspacing="1" cellpadding="4" width="100%" bgcolor="#c8c8c8" border="0">
                        <tr bgcolor="#e9e9e9">
                            <td>
                            <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                    <tr>
                                        <td width="120">
                                            <img height="9" hspace="5" src="/images/arw_gry_rgt.gif" width="9" align="absMiddle">产品名称：</td>
                                        <td>
                                           <%-- <asp:DropDownList ID="dropProduct" runat="server">                                           
                                            </asp:DropDownList>--%>
                                            <dx:ASPxDropDownEdit ClientInstanceName="checkComboBox" ID="ASPxDropDownEdit1" 
                                                SkinID="CheckComboBox" Width="180px" runat="server" EnableAnimation="False" ReadOnly="True">
                                                <DropDownWindowTemplate>
                                                    <dx:ASPxListBox Width="100%" Height="300px" ID="listBox" ClientInstanceName="checkListBox" SelectionMode="CheckColumn" runat="server"  SkinID="CheckComboBoxListBox">
                                                    <ClientSideEvents SelectedIndexChanged="OnListBoxSelectionChanged" />
                                                    </dx:ASPxListBox>
                                                    <table style="width:100%"><tr><td align="right">
                                                        <dx:ASPxButton ID="ASPxButton1" AutoPostBack="False" runat="server" Text="Close">
                                                            <ClientSideEvents Click="function(s, e){ checkComboBox.HideDropDown(); }"/>
                                                        </dx:ASPxButton>
                                                    </td></tr></table>
                                                </DropDownWindowTemplate>
                                                <ClientSideEvents TextChanged="SynchronizeListBoxValues" DropDown="SynchronizeListBoxValues" />
                                           </dx:ASPxDropDownEdit>
                                        </td>                                       
                                    </tr>
                                </table>
                            </td>
                            <td>
                                <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                    <tr>
                                        <td width="120">
                                            <img height="9" hspace="5" src="/images/arw_gry_rgt.gif" width="9" align="absMiddle">日期类型：</td>
                                        <td>
                                            <asp:DropDownList ID="dateType"  runat="server">
                                            </asp:DropDownList>
                                        </td>                                       
                                    </tr>
                                </table>
                            </td>
							<td>
                                <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                    <tr>
                                        <td width="110">
                                            <img height="9" hspace="5" src="/images/arw_gry_rgt.gif" width="9" align="absMiddle">日期区间：</td>
                                        <td>
                                            从&nbsp;
                                            <asp:TextBox ID="txtgedatebegin" runat="server" CssClass="input2" Width="120px"></asp:TextBox>&nbsp;
                                            <img style="cursor: hand" onclick="JavaScript:calPopForCMon(txtgedatebegin, 'ss');"
                                                height="14" src="/images/dot_date.gif" width="16" align="absMiddle">
                                            &nbsp;到&nbsp;
                                            <asp:TextBox ID="txtgedateend" runat="server" CssClass="input2" Width="120px"></asp:TextBox>&nbsp;
                                            <img style="cursor: hand" onclick="JavaScript:calPopForCMon(txtgedateend, 'ss');"
                                                height="14" src="/images/dot_date.gif" width="16" align="absMiddle"></td>
                                    </tr>
                                </table>
                            </td>
                            <td>
                             <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                    <tr>
                                        <td>
                                            <asp:Button ID="btnSearch" Text="执行" runat="server" onclick="btnSearch_Click" onclientclick="return checkForm()" />&nbsp;
                                            <asp:Button ID="btnExport" Text="导出到Excel" runat="server" 
                                                onclick="btnExport_Click" />
                                        </td>                                       
                                    </tr>
                             </table>
                            </td>
                        </tr>
                    </table>
                    <table style="position: relative; top: -6px" cellspacing="0" cellpadding="0" width="100%"
                        border="0">
                        <tr>
                            <td>
                                <img height="6" src="/images/corner_lft2.gif" width="6"></td>
                            <td>
                                <div align="right">
                                    <img height="6" src="/images/corner_rgt2.gif" width="6"></div>
                            </td>
                        </tr>
                    </table>
                    <table bordercolor="#c2d2e2" cellspacing="0" cellpadding="2" width="100%" border="1">
                        <tr>
                            <td>
                                <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                    <tr>
                                        <td bgcolor="#1765a7">
                                            <img height="11" src="/images/pic_results.gif" width="61"></td>
                                    </tr>
                                </table>                                
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <dx:ASPxGridView ID="ASPxGridView1" runat="server"  Width="100%" 
                                    AutoGenerateColumns="False" 
                                    CssFilePath="~/App_Themes/Office2003Blue/{0}/styles.css" 
                                    CssPostfix="Office2003Blue" >
                                <Columns>
                                    <dx:GridViewDataColumn FieldName="card_no" VisibleIndex="0" Caption="卡号"/>            
                                    <dx:GridViewDataColumn FieldName="procduct_name" VisibleIndex="1" Caption="产品名称"/>                                                
                                    <dx:GridViewDataColumn FieldName="cparty_name" VisibleIndex="2" Caption="客户姓名"/>
                                    <dx:GridViewDataTextColumn FieldName="initial_amount" VisibleIndex="3" Caption="销售金额" >
                                            <PropertiesTextEdit DisplayFormatString="c"></PropertiesTextEdit>
                                            <HeaderStyle HorizontalAlign="Right" />
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataColumn FieldName="real_discount" VisibleIndex="4" Caption="销售折扣">
                                        <HeaderStyle HorizontalAlign="Right" />
                                    </dx:GridViewDataColumn>
                                    <dx:GridViewDataTextColumn FieldName="due_amount" VisibleIndex="5" Caption="到期金额" >                                            
                                            <PropertiesTextEdit DisplayFormatString="c"></PropertiesTextEdit>
                                            <HeaderStyle HorizontalAlign="Right" />
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn FieldName="deal_balance" VisibleIndex="6" Caption="余额" >
                                            <PropertiesTextEdit DisplayFormatString="c" />
<PropertiesTextEdit DisplayFormatString="c"></PropertiesTextEdit>

                                            <HeaderStyle HorizontalAlign="Right" />
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn FieldName="value_date" VisibleIndex="7" Caption="起息日">
                                        <PropertiesTextEdit DisplayFormatString="yyyy-MM-dd" />                                          
<PropertiesTextEdit DisplayFormatString="yyyy-MM-dd"></PropertiesTextEdit>
                                    </dx:GridViewDataTextColumn>  
                                    <dx:GridViewDataTextColumn FieldName="due_date" VisibleIndex="8" Caption="到期日">
                                        <PropertiesTextEdit DisplayFormatString="yyyy-MM-dd" /> 
<PropertiesTextEdit DisplayFormatString="yyyy-MM-dd"></PropertiesTextEdit>
                                    </dx:GridViewDataTextColumn>  
                                    <dx:GridViewDataTextColumn FieldName="entity" GroupIndex="0" VisibleIndex="9" Caption="公司"/> 
                                </Columns>
                                <Settings ShowFooter="True" />
                                <GroupSummary>
                                    <dx:ASPxSummaryItem FieldName="initial_amount" SummaryType="Sum"  DisplayFormat="{0:c}"/>
                                </GroupSummary>    
                                <TotalSummary>
                                    <dx:ASPxSummaryItem FieldName="initial_amount" SummaryType="Sum"  DisplayFormat="{0:c}"/>
                                    <dx:ASPxSummaryItem FieldName="due_amount" SummaryType="Sum"  DisplayFormat="{0:c}"/>
                                </TotalSummary>                             
                                    <SettingsPager PageSize="20" mode="ShowAllRecords">
                                    </SettingsPager>
                                <Settings ShowFooter="True"></Settings>

                                    <Images SpriteCssFilePath="~/App_Themes/Office2003Blue/{0}/sprite.css">
                                        <LoadingPanelOnStatusBar Url="~/App_Themes/Office2003Blue/GridView/gvLoadingOnStatusBar.gif">
                                        </LoadingPanelOnStatusBar>
                                        <LoadingPanel Url="~/App_Themes/Office2003Blue/GridView/Loading.gif">
                                        </LoadingPanel>
                                    </Images>
                                    <ImagesFilterControl>
                                        <LoadingPanel Url="~/App_Themes/Office2003Blue/Editors/Loading.gif">
                                        </LoadingPanel>
                                    </ImagesFilterControl>
                                    <Styles CssFilePath="~/App_Themes/Office2003Blue/{0}/styles.css" 
                                        CssPostfix="Office2003Blue">
                                        <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                        </Header>
                                        <LoadingPanel ImageSpacing="10px">
                                        </LoadingPanel>
                                    </Styles>
                                    <StylesEditors>
                                        <ProgressBar Height="25px">
                                        </ProgressBar>
                                    </StylesEditors>
                                </dx:ASPxGridView>
                            </td>
                        </tr>
                    </table>
                    <table cellspacing="0" cellpadding="0" width="100%" border="0">
                        <tr>
                            <td>
                                <img height="3" src="/images/spacer.gif" width="1"></td>
                        </tr>
                    </table>
                    <br>
                </td>
                <td valign="top" width="10">
                    <img height="1" alt="" src="/images/spacer.gif" width="10"></td>
            </tr>
        </table>
    </form>
</body>
</html>